﻿<UserControl x:Class="Hisaab.Windows.Client.View.VehicleTransactionView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:conv="clr-namespace:Hisaab.Windows.Client.Converters" mc:Ignorable="d"
      d:DesignHeight="417" d:DesignWidth="599">
    <UserControl.Resources>
        <conv:VehicleToNameConverter  x:Key="VehicleToNameConverter" />
        <conv:AccountIdToNameConverter x:Key="AccountNameConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="250*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="138*" />
        </Grid.RowDefinitions>

        <Label Grid.Column="0" Grid.Row="0" Content="details" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="0" Content="{Binding Path=SelectedTransaction.Details}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="1" Content="vehicle" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="1" Content="{Binding Path=SelectedTransaction.VehicleId, Converter={StaticResource VehicleToNameConverter}}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="2" Content="date" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="2" Content="{Binding Path=SelectedTransaction.Date}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="3" Content="amount" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="3" Content="{Binding Path=SelectedTransaction.Amount, StringFormat='{}{0:C}'}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="4" Content="account" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="4" Content="{Binding Path=SelectedTransaction.Account, Converter={StaticResource AccountNameConverter}}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="5" Content="milage" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="5" Content="{Binding Path=SelectedTransaction.Milage}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="6" Content="fill" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="6" Content="{Binding Path=SelectedTransaction.Fill}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="7" Content="vehicle" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="7" Content="{Binding Path=SelectedTransaction.Vehicle}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="8" Content="oil" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="8" Content="{Binding Path=SelectedTransaction.Oil}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="9" Content="service" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="9" Content="{Binding Path=SelectedTransaction.Service}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="10" Content="tires" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="10" Content="{Binding Path=SelectedTransaction.Tires}" Style="{DynamicResource Heading2Simple}"/>

        <Label Grid.Column="0" Grid.Row="11" Content="notes" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="11" Content="{Binding Path=SelectedTransaction.Notes}" Style="{DynamicResource Heading2Simple}"/>

    </Grid>
</UserControl>